<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${initProjectVo.packageName}.mapper.SysRoleMapper">
        <select id="selectEntityList" resultType="${initProjectVo.packageName}.dto.SysRoleMultiDTO">
                SELECT id,role_name,enable,allow_delete,create_time from t_sys_role
        </select>
        <select id="selectRoleName" resultType="java.lang.String">
                SELECT
                t3.role_name
                FROM
                t_sys_user t1,
                t_sys_user_role t2,
                t_sys_role t3
                WHERE t1.id = t2.user_id AND t2.role_id = t3.id
                and t1.id = ${"#"}{userId}
        </select>
</mapper>